import cn.edu.hbsi.dao.UserDao;
import cn.edu.hbsi.domain.User;
import cn.edu.hbsi.utils.GetSqlSessionUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.After;
import org.junit.Test;

public class test
{
    private SqlSession sqlSession = GetSqlSessionUtil.getSqlSession();
    private UserDao userDao = sqlSession.getMapper(UserDao.class);

    @Test
    public void testSelectUserWithOrders(){
        Integer uId = 1;

        User user = sqlSession.selectOne("cn.edu.hbsi.dao.UserDao.selectUserWithOrders",uId);
        System.out.println(user);
    }

    @After
    public void destory(){
        sqlSession.commit();
        sqlSession.close();
    }
}
